package View;

import java.sql.Date;

import javax.swing.table.AbstractTableModel;


@SuppressWarnings("serial")
public class TransactionTableModel extends AbstractTableModel {
public int count = 0;
	public 	String[] columnNames = {
            "Nr",
            "Date", 
            "Saldo",
            "Bij/Af",
				};
	
	@SuppressWarnings("rawtypes")
	Class[] columnTypes = new Class[] {
		Integer.class, Date.class, Integer.class, String.class
		};
	 @SuppressWarnings({ "unchecked", "rawtypes" })
	public Class getColumnClass(int columnIndex) {
			return columnTypes[columnIndex];
		}
		boolean[] columnEditables = new boolean[] {
			false, false, false,false
		};
		 public boolean isCellEditable(int row, int column) {
			return columnEditables[column];
		}
		 

	
	public int getColumnCount() {
		return columnNames.length;
	}
	//alles transacties in arraylist zetten
	
	public int getRowCount() {
		return 0; //Arraylist.size()
	}

	
	public Object getValueAt(int arg0, int arg1) {
		// Transactie a = Arraylist.getWhereIndexnummeris(arg0);
		if(arg1 == 0){
			count =count + 1;
			return count; //Arraylist.size()
		}
		if(arg1 == 1){
			return null; //a.getTransactieSaldo
		}
		if(arg1 == 2){
			return null; //a.getTransactieDate
		}
		if(arg1 == 3){
			return null; //a.getTransactieVan.getNummer
		}

		return "Null";
	}

	@Override
	public String getColumnName(int arg0) {
		return columnNames[arg0];
	}
	


}
